package com.zsjt.yysapi.core.controller;


import com.zsjt.yysapi.common.model.AjaxResult;
import com.zsjt.yysapi.common.model.BaseController;
import com.zsjt.yysapi.common.model.page.TableDataInfo;
import com.zsjt.yysapi.core.pojo.Category;
import com.zsjt.yysapi.core.service.CategoryService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 分类 前端控制器
 * </p>
 *
 * @author zsq
 * @since 2021-07-12
 */
@RestController
@RequestMapping("/core/category")
public class CategoryController extends BaseController {

    @Autowired
    private CategoryService categoryService;

    /**
     * 分类
     *
     * @param category
     * @return
     */
    @ApiOperation("分类")
    @GetMapping("/list")
    public AjaxResult list(Category category) {
        return AjaxResult.success(categoryService.list(category));
    }

}

